import request from '@/axios';

/**
 * 用户列表
 * @param params
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export const userList = (params) => {
  return request({
    url: '/restaurant/common/user-list',
    method: 'get',
    params: {
      params
    }
  });
};

/**
 * 用户列表(添加禁用属性)
 * @param disabled
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export const userListBySalary = (disabled) => {

  return request({
    url: `/restaurant/common/userListBySalary?disabled=${disabled}`,
    method: 'get'
  });
};
/**
 * 获取用户列表(订台)
 * @param params
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export const userListByBooker = (params) => {
  return request({
    url: '/restaurant/common/userListByBooker',
    method: 'get',
    params: {
      params
    }
  });
};
/**
 * 获取用户列表(看台)
 * @param params
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export const userListByStand = (params) => {
  return request({
    url: '/restaurant/common/userListByStand',
    method: 'get',
    params: {
      params
    }
  });
};

/**
 * 支出分类树
 * @param params
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export const getLevelTree = (params) => {
  return request({
    url: '/restaurant/common/getLevelTree',
    method: 'get',
    params: {
      params
    }
  });
};

/**
 * 获取参与考勤的用户
 * @param params
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export const getUserAttendance = (params) => {
  return request({
    url: '/restaurant/common/userAttendance',
    method: 'get',
    params: {
      params
    }
  });
};